define(function(require, exports, module) {
    var myPub = require('./public');

    var oShadow = $('.js_shadow'); //阴影
    var oServer_button = $('.js_server_button'); //服务说明确定按钮
    // ------------------2018年3月16日17:28:36-------------------------
    var oCoverageMain = $('.js_coverageMain'); //全额保障说明内容
    var oCoverageList = $('.js_coverageList'); //全额保障tag
    var oCoverage_button = $('.js_coverage_button'); //全额保障说明确定按钮
    // ------------------2018年3月16日17:28:36-------------------------

    var moveHeight = oCoverageMain.outerHeight(true);


    //产品服务确定按钮
    oServer_button.hammer().on('tap', function(e) {
        oServerMain.stop().animate({ bottom: -moveHeight }, 300, function() {
            oServerMain.hide();
            oShadow.hide();
            myPub.OffMuiEvent(true);
        });
        $(document).off('touchmove');
        myPub.HamstopPropaga()
    });

    // -----------------2018年3月16日17:30:29-------------------------------------
    // 显示全额保障详细内容
    oCoverageList.hammer().on('tap', function(e) {
        myPub.OffMuiEvent(false);
        oCoverageMain.show().stop().animate({ 'bottom': 0 }, 300, function() {
            oShadow.show();
        });
        myPub.HamstopPropaga();
        $(document).on('touchmove', function(e) { e.preventDefault(); });
    });

    //全额保障说明确定按钮
    oCoverage_button.hammer().on('tap', function(e) {
        oCoverageMain.stop().animate({ bottom: -moveHeight }, 300, function() {
            oCoverageMain.hide();
            oShadow.hide();
            myPub.OffMuiEvent(true);
        });
        $(document).off('touchmove');
        myPub.HamstopPropaga()
    });
    // -----------------2018年3月16日17:30:29-------------------------------------

    oShadow.hammer().on('tap', function(e) {
        //隐藏服务
        oCoverageMain.stop().animate({ bottom: -moveHeight }, 300, function() {
            oCoverageMain.hide();
            oShadow.hide();
        });
        myPub.OffMuiEvent(true);
        myPub.HamstopPropaga();
        $(document).off('touchmove');
    });

    // --------------------2018年3月16日17:48:44-----------------------------------
    //阴影关闭
    oShadow.hammer().on('tap', function(e) {
        //隐藏服务
        oCoverageMain.stop().animate({ bottom: -moveHeight }, 300, function() {
            oCoverageMain.hide();
            oShadow.hide();
        });
        myPub.OffMuiEvent(true);
        myPub.HamstopPropaga();
        $(document).off('touchmove');
    });
    // --------------------2018年3月16日17:48:44-----------------------------------

});